<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRuleSetTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rule_set', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('policy_id')->comment('政策ID');
            $table->integer('rule_type')->comment('1=成人，2=儿童，3=婴儿');
            $table->integer('rebate_price')->nullable()->comment('返钱');
            $table->integer('rebate_percentage')->nullable()->comment('返百分比');
            $table->string('biding_price')->nullable()->comment('竞价金额');
            $table->integer('biding_percentage')->nullable()->comment('竞价分比');
            $table->integer('freight_min')->nullable()->comment('运价最小值');
            $table->integer('freight_max')->nullable()->comment('运价最大值');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('rule_set');
    }
}
